Skip to content

Rollup of 6 pull requests - #160135

Closed
jhpratt wants to merge 17 commits into
rust-lang:mainfrom
jhpratt:rollup-e0twuwN
Closed

Rollup of 6 pull requests#160135
jhpratt wants to merge 17 commits into
rust-lang:mainfrom
jhpratt:rollup-e0twuwN

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 29, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

CrooseGit and others added 17 commits July 22, 2026 11:37
When `-Z implicit-sysroot-deps=false`, the sysroot is not added to the list of search paths for resolving top level dependencies.
One UI test that fails to find crate `std` as it does not look in the sysroot.
One UI test that which only transitively depends on std, and thus it is
searched for in the sysroot.
1) Depending transitively on a lib in the sysroot resolves fine with `-Zimplicit-sysroot-deps=false`
2) Depending directly on a lib in the sysroot does not resolve implicitly with `-Zimplicit-sysroot-deps=false`
…bjorn3

Remove llvm_enzyme feature outside of bootstrap

r? bjorn3
I think you were the one who did the last refactoring on how we pass this feature.

We originally introduced and used this compile-time cfg since we were suspecting that some of the work we did for autodiff was causing a compile time regression even when no autodiff was used. It turned out later that we just did extra work due to a bug, which was fixed.

Thanks to the dlopen work our checks are now much simpler. We only do autodiff work if the -Zautodiff=Enable flag was set. If the flag is set we also just check if libEnzyme is in the sysroot, and if we can not find it, we error out.

I noticed it while fixing some related checks in rust-lang#158333
Add semver check test command for checking API compatibility of stdlib

This PR adds a new test to bootstrap (not executed by default at the moment) that checks the API compatibility of the standard library using the https://github.com/obi1kenobi/cargo-semver-checks tool.

The command can be executed using `x test std-semver-check`.

(Note: I realized that `x dist rust-docs-json` executed twice in a row invalidates Cargo cache for some reason, that is a separate issue though).

The test is not yet executed on CI, I would do that in a separate PR (maybe pending a t-libs FCP or something).

The test checks that c-s-c is installed, and then uses git to lookup a parent baseline commit (in a future extension, we should make the baseline commit be configurable through `config.toml`). Then it downloads the corresponding `rust-docs-json` component of that commit from CI and extracts it. It generates the same JSON docs component from local sources, and then runs c-s-c on those two JSON files to compare their API.

Output when API stability is broken:

```
Checking semver compatibility of core
    Checking <unknown> v1.99.0-nightly  (d527bc9      2026-07-20) -> v1.99.0-dev (assume minor change)
     Checked [   1.282s] 196 checks: 196 pass, 57 skip
     Summary no semver update required
    Finished [   2.368s] <unknown>
Checking semver compatibility of alloc
    Checking <unknown> v1.99.0-nightly  (d527bc9      2026-07-20) -> v1.99.0-dev (assume minor change)
     Checked [   0.030s] 196 checks: 196 pass, 57 skip
     Summary no semver update required
    Finished [   0.127s] <unknown>
Checking semver compatibility of std
    Checking <unknown> v1.99.0-nightly  (d527bc9      2026-07-20) -> v1.99.0-dev (assume minor change)
     Checked [   0.055s] 196 checks: 195 pass, 1 fail, 0 warn, 57 skip

--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/function_missing.ron

Failed in:
  function std::process::id, previously in file library/std/src/process.rs:2656

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [   0.243s] <unknown>
```

CC @obi1kenobi @Amanieu

r? @jieyouxu
…it-sysroot-deps, r=nnethercote

Add `-Zimplicit-sysroot-deps`

This PR, originally authored by @CrooseGit, adds support for a new flag [proposed in the `build-std=always` RFC](https://rust-lang.github.io/rfcs/3874-build-std-always.html#preventing-implicit-sysroot-dependencies). It unblocks work by @Bryanskiy around handling panic strategies in build-std, for which rustc must look for them in `-Ldependency` locations and not the sysroot.

`-Zimplicit-sysroot-deps` is true by default. When false, rustc will not look in the sysroot when attempting to resolve direct dependencies. It is intended to be used by Cargo when using build-std to improve error messages, avoiding the common "duplicate lang item in crate `core`" error that occurs when not all required standard library crates have been built.

Not included in this PR is the behaviour around dependencies injected by rustc in `rustc_metadata`, such as panic runtimes and compiler-builtins, which will be addressed in the future.
…ouxu

Show jobs where a given test was executed in `test-dashboard`

This lets us see the specific set of jobs where a given test was executed on CI. This should be quite useful e.g. for debugging where we run debuginfo tests.

To test:
```bash
$ cargo run --release --manifest-path src/ci/citool/Cargo.toml -- test-dashboard 008fa22 --output-dir test-dashboard
```

r? @jieyouxu
Remove various superfluous lint attributes
…ouxu

add additional license option for third-party dependencies
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 29, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 29, 2026
@jhpratt

jhpratt commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit bae7106 has been approved by jhpratt

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 29, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Rollup of 6 pull requests

Successful merges:

 - #158460 (Remove llvm_enzyme feature outside of bootstrap)
 - #159671 (Add semver check test command for checking API compatibility of stdlib)
 - #159717 (Add `-Zimplicit-sysroot-deps`)
 - #159994 (Show jobs where a given test was executed in `test-dashboard`)
 - #160085 (Remove various superfluous lint attributes)
 - #160123 (add additional license option for third-party dependencies)
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 29, 2026
@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

💔 Test for e556a78 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-aarch64-linux failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

warning: prefer `FxHashMap` over `HashMap`, it has better performance
  --> /rustc-dev/e556a7873cae007b5402a838ed65f940684cc2ee/compiler/rustc_macros/src/diagnostics/message.rs:39:25
   |
39 |         let mut fields: HashMap<String, (&syn::Ident, bool)> =
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: a `use rustc_data_structures::fx::FxHashMap` may be necessary

warning: prefer `FxHashSet` over `HashSet`, it has better performance
---

warning: prefer `FxHashSet` over `HashSet`, it has better performance
   --> /rustc-dev/e556a7873cae007b5402a838ed65f940684cc2ee/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs:149:31
    |
149 |     used_fields: &'parent mut HashSet<proc_macro2::Ident>,
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: a `use rustc_data_structures::fx::FxHashSet` may be necessary

   Compiling rustc_graphviz v0.0.0 (/checkout/compiler/rustc_graphviz)
warning: prefer `FxHashMap` over `HashMap`, it has better performance
   --> /rustc-dev/e556a7873cae007b5402a838ed65f940684cc2ee/compiler/rustc_macros/src/diagnostics/utils.rs:263:28
    |
263 | pub(super) type FieldMap = HashMap<String, (syn::Ident, TokenStream)>;
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: a `use rustc_data_structures::fx::FxHashMap` may be necessary

warning: prefer `FxHashSet` over `HashSet`, it has better performance
---

warning: prefer `FxHashMap` over `HashMap`, it has better performance
   --> /rustc-dev/e556a7873cae007b5402a838ed65f940684cc2ee/compiler/rustc_macros/src/symbols.rs:156:24
    |
156 |         Entries { map: HashMap::with_capacity(capacity) }
    |                        ^^^^^^^
    |
    = note: a `use rustc_data_structures::fx::FxHashMap` may be necessary

[RUSTC-TIMING] ena test:false 0.130
---

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc::string::String>
             at /rust/deps/anyhow-1.0.102/src/backtrace.rs:10:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/e556a7873cae007b5402a838ed65f940684cc2ee/src/tools/opt-dist/src/exec.rs:81:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/e556a7873cae007b5402a838ed65f940684cc2ee/src/tools/opt-dist/src/exec.rs:251:18
   3: opt_dist::execute_pipeline::{closure#1}::{closure#0}
             at /rustc/e556a7873cae007b5402a838ed65f940684cc2ee/src/tools/opt-dist/src/main.rs:265:25
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/e556a7873cae007b5402a838ed65f940684cc2ee/src/tools/opt-dist/src/timer.rs:111:22
   5: opt_dist::execute_pipeline::{closure#1}
             at /rustc/e556a7873cae007b5402a838ed65f940684cc2ee/src/tools/opt-dist/src/main.rs:246:19
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, (opt_dist::training::RustcPGOProfile, opt_dist::training::RustdocPGOProfile)>
             at /rustc/e556a7873cae007b5402a838ed65f940684cc2ee/src/tools/opt-dist/src/timer.rs:111:22
   7: opt_dist::execute_pipeline
             at /rustc/e556a7873cae007b5402a838ed65f940684cc2ee/src/tools/opt-dist/src/main.rs:243:15
   8: opt_dist::main
             at /rustc/e556a7873cae007b5402a838ed65f940684cc2ee/src/tools/opt-dist/src/main.rs:516:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/core/src/ops/function.rs:250:5
  10: std::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/sys/backtrace.rs:166:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/rt.rs:206:18
  12: <&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<()>>::call_once
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/core/src/ops/function.rs:287:21
  13: std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/panicking.rs:576:43
  14: std::panicking::catch_unwind::<i32, &dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe>
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/panicking.rs:544:19
  15: std::panic::catch_unwind::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/panic.rs:359:14
  16: std::rt::lang_start_internal::{closure#0}
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/rt.rs:175:24
  17: std::panicking::catch_unwind::do_call::<std::rt::lang_start_internal::{closure#0}, isize>
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/panicking.rs:576:43

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 29, 2026
@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

PR #160085, which is a member of this rollup, was unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 29, 2026
@jhpratt
jhpratt deleted the rollup-e0twuwN branch July 29, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants